package ooday01;

import java.util.SplittableRandom;

public class Car {
    //属性
    String brand;//品牌
    String color;//颜色
    double price;//价格

    Car() {//构造一个无参的方法,防止报错

    }

    Car(String brand, String color, double price) {//构造方法(有参的
        this.brand = brand;
        this.color = color;
        this.price = price;
    }


    void start() {
        System.out.println(this.brand + "牌" + "颜色是" + this.color + this.price + "价格的车启动了");
    }

    void run() {
        System.out.println(this.brand + "牌" + "颜色是" + this.color + this.price + "价格的车开始跑了");
    }

    void stop() {
        System.out.println(this.brand + "牌" + "颜色是" + this.color + this.price + "价格的车停止了");
    }


}
